<template>
  <div class="set-admin-me">
    <w-nav-bar
      title="Me"/>
    <div class="w-flex-center image-box">
      <w-image-up
        ref="W_IMAGE_UP"
        :souce-url="model.home_icon"/>
    </div>

    <group>
      <x-textarea
        title="标题"
        placeholder="请输入标题"
        v-model="model.home_title"/>
      <x-textarea
        title="简历"
        placeholder="请输入简历链接"
        v-model="model.home_jianli"/>
      <x-textarea
        title="关于我"
        placeholder="请输入关于我"
        v-model="model.abouts"/>
      <x-textarea
        title="专业技能"
        placeholder="请输入专业技能"
        v-model="model.expertise"/>
      <x-textarea
        title="工作经验"
        placeholder="请输入工作经验"
        v-model="model.experience_show"/>
      <x-textarea
        title="工作经历"
        placeholder="请输入工作经历"
        v-model="model.works_show"/>
    </group>

    <group>
      <x-textarea
        title="iOS"
        v-model="model.iosShow"/>
      <cell
        :inline-desc="model.iosNum"
        primary="content">
        <range v-model="model.iosNum"/>
      </cell>
    </group>

    <group>
      <x-textarea
        title="Node"
        v-model="model.nodeShow"/>
      <cell
        :inline-desc="model.nodeNum"
        primary="content">
        <range v-model="model.nodeNum"/>
      </cell>
    </group>


    <group>
      <x-textarea
        title="前端"
        v-model="model.webShow"/>
      <cell
        :inline-desc="model.webNum"
        primary="content">
        <range v-model="model.webNum"/>
      </cell>
    </group>

    <group>
      <x-textarea
        title="小程序"
        v-model="model.xcxShow"/>
      <cell
        :inline-desc="model.xcxNum"
        primary="content">
        <range v-model="model.xcxNum"/>
      </cell>
    </group>

    <group>
      <x-textarea
        title="Java"
        v-model="model.javaShow"/>
      <cell
        :inline-desc="model.javaNum"
        primary="content">
        <range v-model="model.javaNum"/>
      </cell>
    </group>

    <w-bottom-btn
      :model="model"
      :btn1-title="''"
      @click2="okBtnClick"/>
  </div>
</template>

<script>
  import MeModel from '@/models/web/MeModel'
  import WBottomBtn from '@/components/mobile/confirmBottomBtn'
  import WImageUp from '@/components/global/imageUp/oss'
  import { Group, XInput, XTextarea, Range, Cell } from 'vux'
  export default {
    name: "SetAdminMe",
    components: {
      WBottomBtn,
      WImageUp,
      Group, XInput, XTextarea, Range, Cell
    },
    data() {
      return {
        model: new MeModel()
      }
    },
    methods: {
      /**
       * 确定按钮点击
       */
      okBtnClick(callback) {
        this.$refs['W_IMAGE_UP'].upImage ().then((data) => {
          this.model.pic = data
          callback()
        }).catch(this.$w_error_pop)
      },
      /**
       * 加载数据
       */
      loadData() {
        this.model.getModel()
      }
    },
    mounted() {
      this.loadData()
    }
  }
</script>

<style lang="scss" scoped>
  .set-admin-me {
    .image-box {
      padding-top: 10px;
    }
  }
</style>

<style lang="scss">
  .set-admin-me {
    .vux-cell-bd {
      width: 30px;
    }
  }
</style>
